import java.io.*;
import java.util.*;

public class RunList{

	public static void main(String[] args){
		try{
			String key = "Hide";
			int count = 1;
			BufferedReader br = new BufferedReader(new FileReader("list.txt"));
			String line = br.readLine();
			while(line != null){
				if(line.contains(key)){
					System.out.print(""+count+"   ");
					line = line.replace("save school", "");
					line = line.replace("get a brochure", "");
					System.out.println(line.substring(12));
					count++;
				}
				line = br.readLine();
			}
		}
		catch(Exception e){
		e.printStackTrace();
		}
	}
}